import { Component, OnInit } from '@angular/core';
import { ApiService } from '../../services/api.service';
import { UserInfoDto } from '../../models/sys/user-info.dto';
import { Consts } from '../../models/consts/consts';

@Component({
  selector: 'app-user-info',
  templateUrl: './user-info.component.html',
  styleUrl: './user-info.component.css'
})
export class UserInfoComponent implements OnInit {
  userInfo?: UserInfoDto;

  constructor(private _api: ApiService) {}

  ngOnInit(): void {
    this._api.getUserInfo().subscribe((resp) => {
      if (resp.code == Consts.RESP_OK && resp.data) {
        this.userInfo = resp.data;
      }
    });
  }


}
